Class ControllerResponse

Summary

Fully Qualified Name: CodeIgniter\Test\ControllerResponse

Description

Testable response from a controller

Methods

Name Description Defined By
__call() Forward any unrecognized method calls to our DOMParser instance. ControllerResponse
__construct() Constructor. ControllerResponse
getBody() Retrieve the body. ControllerResponse
isOK() Boils down the possible responses into a boolean valid/not-valid response type. ControllerResponse
isRedirect() Returns whether or not the Response was a redirect response ControllerResponse
request() Request accessor. ControllerResponse
response() Response accessor. ControllerResponse
setBody() Set the body & DOM. ControllerResponse
setRequest() Set the request. ControllerResponse
setResponse() Set the response. ControllerResponse

Method Details

__call()

Forward any unrecognized method calls to our DOMParser instance.

Parameter Name Type Description
$function string Method
$params mixed Any

Returns: mixed

__construct()

Constructor.

Returns:

getBody()

Retrieve the body.

Returns: string

isOK()

Boils down the possible responses into a boolean valid/not-valid response type.

Returns: bool

isRedirect()

Returns whether or not the Response was a redirect response

Returns: bool

request()

Request accessor.

Returns: \CodeIgniter\HTTP\IncomingRequest

response()

Response accessor.

Returns: \CodeIgniter\HTTP\Response

setBody()

Set the body & DOM.

Parameter Name Type Description
$body string

Returns: $this

setRequest()

Set the request.

Parameter Name Type Description
$request \CodeIgniter\HTTP\RequestInterface

Returns: $this

setResponse()

Set the response.

Parameter Name Type Description
$response \CodeIgniter\HTTP\ResponseInterface

Returns: $this

Top